package cn.iocoder.yudao.module.member.dal.mysql.mpshunfengcheorderevaluate;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.member.dal.dataobject.mpshunfengcheorderevaluate.MpShunfengcheOrderEvaluateDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.member.controller.app.mpshunfengcheorderevaluate.vo.*;

/**
 * 顺风车订单评价 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface MpShunfengcheOrderEvaluateMapper extends BaseMapperX<MpShunfengcheOrderEvaluateDO> {

    default PageResult<MpShunfengcheOrderEvaluateDO> selectPage(AppMpShunfengcheOrderEvaluatePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MpShunfengcheOrderEvaluateDO>()
                .eqIfPresent(MpShunfengcheOrderEvaluateDO::getOrderId, reqVO.getOrderId())
                .eqIfPresent(MpShunfengcheOrderEvaluateDO::getEvaluate, reqVO.getEvaluate())
                .eqIfPresent(MpShunfengcheOrderEvaluateDO::getEvaluateText, reqVO.getEvaluateText())
                .orderByDesc(MpShunfengcheOrderEvaluateDO::getId));
    }

    default List<MpShunfengcheOrderEvaluateDO> selectList(AppMpShunfengcheOrderEvaluateExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<MpShunfengcheOrderEvaluateDO>()
                .eqIfPresent(MpShunfengcheOrderEvaluateDO::getOrderId, reqVO.getOrderId())
                .eqIfPresent(MpShunfengcheOrderEvaluateDO::getEvaluate, reqVO.getEvaluate())
                .eqIfPresent(MpShunfengcheOrderEvaluateDO::getEvaluateText, reqVO.getEvaluateText())
                .orderByDesc(MpShunfengcheOrderEvaluateDO::getId));
    }

}
